libxc: free thread specific hypercall buffer on xc_interface_close
authorIan Campbell <ian.campbell@citrix.com>
Fri, 30 Jul 2010 15:20:48 +0000 (16:20 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 30 Jul 2010 15:20:48 +0000 (16:20 +0100)
commita543f084db7a5d25c511f4121d27a8e27c215e38
tree9e610adf2dd9e2a9cee54d9c4ec84a84892adef2
parentafc6c57b6d604614433d214eca24ad16bc770d08
libxc: free thread specific hypercall buffer on xc_interface_close

The per-thread hypercall buffer is usually cleaned up on pthread_exit
by the destructor passed to pthread_key_create. However if the calling
application is not threaded then the destructor is never called.

This frees the data for the current thread only but that is OK since
any other threads will be cleaned up by the destructor.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxc/xc_private.c